#include <stdio.h>
void swap(int x, int y)
{
    int t = x;
    x = y;
    y = t;
}
void swap_1(int*x, int *y)
{
    int *t = x;
    x = y;
    y = t;
}
void swap_2(int*x, int *y)
{
    int t = *x;
    *x = *y;
    *y = t;
}
void swap_3(int*x, int *y)
{
    //int a;
    int *t ;// 野指针
    *t = *x;
    *x = *y;
    *y = *t;
}
int main()
{
    int a = 3, b = 5;

    //swap(a, b);
    //swap_1(&a, &b);
    //swap_2(&a, &b);
    swap_3(&a, &b);

    printf("%d %d\n", a, b);
}